﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Linq.Dynamic;
using EIIS.Infrastructure.Repositories;
using EIIS.Infrastructure.Repositories.System.Authority;
using EIIS.Infrastructure.Model.System.Authority;

namespace EIIS.Infrastructure.Repositories.Implement
{
    public class MenuRepository : RepositoryBase<MenuNode>, IMenuRepository
    {
        public bool HasChild(string strId)
        {
            var query = Session.CreateQuery(@"select count(*) from MenuNode as o where o.ParentId=:ParentId")
                .SetString("ParentId", strId);
            return query.UniqueResult<long>() > 0;
        }
    }
}
